package thirteen;

import java.io.File;

public class FileDemo {
    public static void main(String[] args) {
        File file = new File("./demo.txt");
        String name = file.getName();
        System.out.println("name: "+name);
        long len = file.length();
        System.out.println("length: "+len);
        boolean ih = file.isHidden();
        System.out.println("isHidden? "+ih);
        if(file.exists()){
            System.out.println("文件已存在");
        }else{
            System.out.println("文件未创建");
        }
    }
}
